
import request from '@/utils/request'

const api = {
  create: '/t1/point_option/create',
  lists: '/t1/point/rectify_agent_list',
  edit: '/t1/point_option/edit',
  changeStatus: '/t1/point_option/change_status',
  del: '/t1/point_option/del',
  info: '/t1/point_option/info',
  familyList: '/t1/common/family_list',
  villageList: '/t1/common/village_list',
  distribution: '/t1/point/distribution',
  agent: '/t1/point/agent'
}

export function agent (parameter) {
  return request({
    url: api.agent,
    method: 'post',
    data: parameter
  })
}
export function villageList (parameter) {
  return request({
    url: api.villageList,
    method: 'get',
    params: parameter
  })
}
// 积分选项
export function familyList (parameter) {
  return request({
    url: api.familyList,
    method: 'get',
    params: parameter
  })
}
// 积分选项
export function lists (parameter) {
  return request({
    url: api.lists,
    method: 'get',
    params: parameter
  })
}
// 积分选项
export function info (parameter) {
  return request({
    url: api.info,
    method: 'get',
    params: parameter
  })
}
// 创建积分选项
export function create (parameter) {
  return request({
    url: api.create,
    method: 'post',
    data: parameter
  })
}
export function distribution (parameter) {
  return request({
    url: api.distribution,
    method: 'post',
    data: parameter
  })
}
// 编辑积分选项
export function edit (parameter) {
  return request({
    url: api.edit,
    method: 'post',
    data: parameter
  })
}
// 修改状态
export function changeStatus (parameter) {
  return request({
    url: api.changeStatus,
    method: 'post',
    data: parameter
  })
}

// 删除
export function del (parameter) {
  return request({
    url: api.del,
    method: 'post',
    data: parameter
  })
}
